package com.loooooo.pm2024.service;

import com.loooooo.pm2024.modules.sys.SnowFlake;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IdService {

    static Integer dataCenterId = null;


    @Autowired
    SnowFlake snowFlake;

    public Long nextId() {
        return snowFlake.nextId();
    }

    public boolean match(long id, long workerId, long centerId) {
        return snowFlake.match(id, centerId, workerId);
    }

}
